<?php if (!defined('THINK_PATH')) exit(); if(is_array($data_info["list"])): $i = 0; $__LIST__ = $data_info["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div style='border:1px solid #ccc;height:50px;display:flex;margin:3px 0' class='IndexMainList_Info' info_id=<?php echo ($vo["info_id"]); ?> >
	<div style='text-align:center;width:25px;border:1px solid #ccc;height:100%;color:#000'>
		<?php switch($vo["info_type"]): case "1": ?>出售<?php break;?>
			<?php case "2": ?>出租<?php break;?>
			<?php case "3": ?>求购<?php break;?>
			<?php case "4": ?>求租<?php break;?>
			<?php default: ?>出售<?php endswitch;?>
	</div>
	<div style='flex:1;font-size:14px;line-height:25px;padding-left:5px;font-size:10px'>
		<div style='height:25px;border:0px solid;font;normal normal 12/25 normal;overflow:hidden;padding-right:10px;display:flex'>
			<div style='flex:1;word-break:break-all'>
				<?php echo ($vo["info_title"]); ?>
			</div>
			<div style='width:80px;text-align:center'>
				<a class='MeMainInfoList_Cat' info_id='<?php echo ($vo["info_id"]); ?>'>查看</a>&nbsp&nbsp&nbsp&nbsp&nbsp
				<a class='MeMainInfoList_Del' info_id='<?php echo ($vo["info_id"]); ?>' imgs='<?php echo ($vo["info_imgs"]); ?>'>删除<?php echo ($vo["info_imgs"]); ?></a>
			</div>
		</div>
		<div style='display:flex'>
			<div style='flex:1;text-align:right;padding-right:10px'><?php echo ($vo["info_hclass"]); ?></div>
			<div style='flex:1;text-align:right;padding-right:10px'><?php echo ($vo["info_harea"]); ?>㎡ </div>
			<div style='flex:1;text-align:right;padding-right:10px'>
				<?php echo ($vo["info_hprice"]); ?>
				<?php switch($vo["info_type"]): case "2": ?>元<?php break;?>
					<?php case "4": ?>元<?php break;?>
					<?php default: ?>万元<?php endswitch;?>
			</div>
			<div style='flex:1;padding-left:10px'><?php echo (date('Y-m-d',$vo["info_ctime"])); ?></div>

		</div>
	</div>
</div><?php endforeach; endif; else: echo "" ;endif; ?>



<div style='padding:30px 0 60px 0;text-align:center;border:0px solid' id='MeInfoList_Fpage' ><?php echo ($data_info["fpage"]); ?></div>

<script>
	$(function(){
		//缓存信息列表数据到sess,备详情页查看使用
		var info_list = JSON.stringify(<?php echo ($info_list); ?>);
		sessionStorage.info_list = info_list;

		//翻页操作
		$('#MeInfoList_Fpage a').click(function(){
			var me_pnow = $(this).attr('pnow');
			if(!me_pnow){
				exit;
			}
			$(this).css('background','blue').css('color','#fff');
			sessionStorage.ConditionMe_Pnow = me_pnow;
			Me_GetInfoList();
		});

		//点击查看
		$('.MeMainInfoList_Cat').click(function(){
			$.ajax({
				url:'/index.php/Fang/Before/index_infolist_details',
				data:{
					info_id:$(this).attr('info_id'),
					type:'me'
				},
				success:function(res){
					$('#Me_InfoList').html(res);
				}
			});
		});


		//删除操作
		$('.MeMainInfoList_Del').click(function(){
			var del_id = $(this).attr('info_id');
			var Details_InfoList = JSON.parse(sessionStorage.info_list);
			for(i in Details_InfoList){
				if(Details_InfoList[i].info_id == del_id){
					var Details_GetInfo  = Details_InfoList[i];
					break;
				}
			}
			if(!confirm('确认删除？')){
				exit;
			}
			$.ajax({
				url:'/index.php/Fang/Before/me_main_info_list_del',
				type:'post',
				data:{
					token:'<?php echo Token_Set('me_main_info_list_del');?>',
					info_id:del_id,
					info_imgs:Details_GetInfo.info_imgs
				},
				success:function(res){
					//alert(res);
					if(res > 0){
						alert('删除成功！');
						var set_sess = 'sessionStorage.Page_<?php echo I('get.sess_page_name');?>=""';
						eval(set_sess);

					}
					Me_GetInfoList();
				}
			});
		});

	});

</script>